package com.imooc.pojo.bo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


@Data
public class AddressBO {
    private String addressId;
    // swagger文档参数说明注解
    @ApiModelProperty(value = "用户id",name = "userId",example = "1908189H7TNWDTXP",required = true)
    private String userId;
    /**
     * 收件人姓名
     */
    @NotNull(message = "receiver不能为空")   // 自定义错误提示
    private String receiver;
    /**
     * 收件人手机号
     */
    @NotNull(message = "mobile不能为空")   // 自定义错误提示
    @Size(min = 7, max = 11, message = "mobile长度为7-11")  //长度范围
    private String mobile;
    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;
    /**
     * 区县
     */
    private String district;

    /**
     * 详细地址
     */
    private String detail;
}